import {CommonUtils} from "great-jsutils";
import {HttpReponseDataType} from "../data-type/http-reponse-data.type";

export default [
    {
        url: '/api/material/form',
        method: 'get',
        response: () => {
            return HttpReponseDataType.success([
                {
                    id: CommonUtils.uuid(),
                    cname: '通用',
                    icon: 'code-outlined',
                    children: [
                        {
                            id: CommonUtils.uuid(),
                            type: 'button',
                            cname: '按钮',
                            props: {
                                text: '按钮'
                            },
                            class: {inlineblock: true}
                        },
                        {
                            id: CommonUtils.uuid(),
                            type: 'icon',
                            cname: '图标',
                        },
                        {
                            id: CommonUtils.uuid(),
                            type: 'text',
                            cname: '文本',
                        }
                    ]
                },
                {
                    id: CommonUtils.uuid(),
                    cname: '容器',
                    icon: 'code-outlined',
                    children: [
                        {
                            id: CommonUtils.uuid(),
                            type: 'baseContainer',
                            cname: '基本容器',
                        },
                        {
                            id: CommonUtils.uuid(),
                            type: 'flexContainer',
                            cname: 'flex容器',
                        },
                        {
                            id: CommonUtils.uuid(),
                            type: 'twoColumnsContainer',
                            cname: '两栏容器',
                        },
                        {
                            id: CommonUtils.uuid(),
                            type: 'grid',
                            cname: '栅格布局',
                            props: {
                                row: {editColumnIndex: 0},
                            },
                            children: [
                                {
                                    span: 12
                                },
                                {
                                    span: 6
                                },
                                {
                                    span: 6
                                }
                            ]
                        }
                    ]
                },
                {
                    id: CommonUtils.uuid(),
                    cname: '表单',
                    icon: 'code-outlined',
                    children: [
                        {
                            id: CommonUtils.uuid(),
                            type: 'input',
                            cname: '单行输入框',
                        },
                        {
                            id: CommonUtils.uuid(),
                            type: 'textarea',
                            cname: '多行输入框',
                        },
                        {
                            id: CommonUtils.uuid(),
                            type: 'checkbox',
                            cname: '复选框',
                        }
                    ]
                },
                {
                    id: CommonUtils.uuid(),
                    cname: '表格',
                    icon: 'code-outlined',
                    children: [
                        {
                            id: CommonUtils.uuid(),
                            type: 'baseTable',
                            cname: '基本表格',
                        },
                        {
                            id: CommonUtils.uuid(),
                            type: 'treeTable',
                            cname: '树状表格',
                        }
                    ]
                },
                {
                    id: CommonUtils.uuid(),
                    cname: '卡片',
                    icon: 'code-outlined',
                    children: [
                        {
                            id: CommonUtils.uuid(),
                            type: 'normalCard',
                            cname: '普通卡片',
                        },
                        {
                            id: CommonUtils.uuid(),
                            type: 'highCard',
                            cname: '高级卡片',
                        }
                    ]
                }
            ]);
        },
    }
]
